<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<input type="color">
<script>
description('Value sanitization test for input[type=color]');
var input = document.querySelector('input');
input.offsetTop;

shouldBeEqualToString('input.value = "#000000"; input.value', '#000000');
shouldBeEqualToString('input.value = "#ABCDEF"; input.value', '#abcdef');
shouldBeEqualToString('input.value = "#abcdef"; input.value', '#abcdef');

shouldBeEqualToString('input.value = ""; input.value', '#000000');
shouldBeEqualToString('input.value = "#ghijkl"; input.value', '#000000');
shouldBeEqualToString('input.value = "#112233ff"; input.value', '#000000');
shouldBeEqualToString('input.value = "ffccaa"; input.value', '#000000');
shouldBeEqualToString('input.value = " #223344 "; input.value', '#000000');
</script>
